/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.upn.sigemfi.can.be;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Programador
 */
@Entity
@Table(name = "CAN_TRANSACCION_WEB")
@NamedQueries({@NamedQuery(name = "TransaccionWeb.findAll", query = "SELECT t FROM TransaccionWeb t"), @NamedQuery(name = "TransaccionWeb.findByIdTransaccionWeb", query = "SELECT t FROM TransaccionWeb t WHERE t.idTransaccionWeb = :idTransaccionWeb"), @NamedQuery(name = "TransaccionWeb.findByFechaTransaccionWeb", query = "SELECT t FROM TransaccionWeb t WHERE t.fechaTransaccionWeb = :fechaTransaccionWeb"), @NamedQuery(name = "TransaccionWeb.findByMontoTransaccionWeb", query = "SELECT t FROM TransaccionWeb t WHERE t.montoTransaccionWeb = :montoTransaccionWeb")})
public class TransaccionWeb implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID_TRANSACCION_WEB", nullable = false)
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    private Long idTransaccionWeb;
    @Column(name = "FECHA_TRANSACCION_WEB")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaTransaccionWeb;
    @Column(name = "MONTO_TRANSACCION_WEB", precision = 18, scale = 2)
    private BigDecimal montoTransaccionWeb;
    @OneToMany(mappedBy = "fidCanTransaccionWeb", fetch = FetchType.LAZY)
    private List<TransaccionGiroWeb> transaccionGiroWebCollection;
    @OneToMany(mappedBy = "fidCanTransaccionWeb", fetch = FetchType.LAZY)
    private List<TransaccionInternaWeb> transaccionInternaWebCollection;
    @OneToMany(mappedBy = "fidCanTransaccionWeb", fetch = FetchType.LAZY)
    private List<TransaccionExternaWeb> transaccionExternaWebCollection;
    @OneToMany(mappedBy = "fidCanTransaccionWeb", fetch = FetchType.LAZY)
    private List<TransaccionServicioWeb> transaccionServicioWebCollection;

    public TransaccionWeb() {
    }

    public TransaccionWeb(Long idTransaccionWeb) {
        this.idTransaccionWeb = idTransaccionWeb;
    }

    public Long getIdTransaccionWeb() {
        return idTransaccionWeb;
    }

    public void setIdTransaccionWeb(Long idTransaccionWeb) {
        this.idTransaccionWeb = idTransaccionWeb;
    }

    public Date getFechaTransaccionWeb() {
        return fechaTransaccionWeb;
    }

    public void setFechaTransaccionWeb(Date fechaTransaccionWeb) {
        this.fechaTransaccionWeb = fechaTransaccionWeb;
    }

    public BigDecimal getMontoTransaccionWeb() {
        return montoTransaccionWeb;
    }

    public void setMontoTransaccionWeb(BigDecimal montoTransaccionWeb) {
        this.montoTransaccionWeb = montoTransaccionWeb;
    }

    public List<TransaccionGiroWeb> getTransaccionGiroWebCollection() {
        return transaccionGiroWebCollection;
    }

    public void setTransaccionGiroWebCollection(List<TransaccionGiroWeb> transaccionGiroWebCollection) {
        this.transaccionGiroWebCollection = transaccionGiroWebCollection;
    }

    public List<TransaccionInternaWeb> getTransaccionInternaWebCollection() {
        return transaccionInternaWebCollection;
    }

    public void setTransaccionInternaWebCollection(List<TransaccionInternaWeb> transaccionInternaWebCollection) {
        this.transaccionInternaWebCollection = transaccionInternaWebCollection;
    }

    public List<TransaccionExternaWeb> getTransaccionExternaWebCollection() {
        return transaccionExternaWebCollection;
    }

    public void setTransaccionExternaWebCollection(List<TransaccionExternaWeb> transaccionExternaWebCollection) {
        this.transaccionExternaWebCollection = transaccionExternaWebCollection;
    }

    public List<TransaccionServicioWeb> getTransaccionServicioWebCollection() {
        return transaccionServicioWebCollection;
    }

    public void setTransaccionServicioWebCollection(List<TransaccionServicioWeb> transaccionServicioWebCollection) {
        this.transaccionServicioWebCollection = transaccionServicioWebCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idTransaccionWeb != null ? idTransaccionWeb.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TransaccionWeb)) {
            return false;
        }
        TransaccionWeb other = (TransaccionWeb) object;
        if ((this.idTransaccionWeb == null && other.idTransaccionWeb != null) || (this.idTransaccionWeb != null && !this.idTransaccionWeb.equals(other.idTransaccionWeb))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "edu.upn.sigemfi.can.be.TransaccionWeb[idTransaccionWeb=" + idTransaccionWeb + "]";
    }

}
